/*
H(n)=1+1/2+1/3+...+1/n
输入n，求H(n)。
 */

package com.yuan.algorithms.Algorithm_1;

import java.util.Scanner;
public class 调和级数 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while(sc.hasNext()){
            int n = sc.nextInt();
            double sum = 1;
            for (double i = 2; i <= n; i++) {
                sum += 1/i;
            }
            System.out.printf("%.3f\n",sum);
        }
    }
    
}
